home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 58 / pcpp58a.iso / extras / quake 3 source / Q3A_ToolSource.exe / Main / Textures.h < prev    next >
Encoding:
Text File  |  2001-01-02  |  2.5 KB  |  76 lines

  1.  
  2. //--typedef struct texdef_s
  3. //--{
  4. //--    char    name[32];
  5. //--    float    shift[2];
  6. //--    float    rotate;
  7. //--    float    scale[2];
  8. //--    int        contents;
  9. //--    int        flags;
  10. //--    int        value;
  11. //--} texdef_t;
  12. //--
  13. //--typedef struct
  14. //--{
  15. //--    int            width, height;
  16. //--    int            originy;
  17. //--    texdef_t    texdef;
  18. //--  int m_nTotalHeight;
  19. //--} texturewin_t;
  20. //--
  21. //--#define QER_TRANS     0x00000001
  22. //--#define QER_NOCARVE   0x00000002
  23. //--
  24. //--typedef struct qtexture_s
  25. //--{
  26. //--    struct    qtexture_s *next;
  27. //--    char    name[64];        // includes partial directory and extension
  28. //--  int        width,  height;
  29. //--    int        contents;
  30. //--    int        flags;
  31. //--    int        value;
  32. //--    int        texture_number;    // gl bind number
  33. //--  
  34. //--  char  shadername[1024]; // old shader stuff
  35. //--  qboolean bFromShader;   // created from a shader
  36. //--  float fTrans;           // amount of transparency
  37. //--  int   nShaderFlags;     // qer_ shader flags
  38. //--    vec3_t    color;                // for flat shade mode
  39. //--    qboolean    inuse;            // true = is present on the level
  40. //--} qtexture_t;
  41. //--
  42.  
  43. // a texturename of the form (0 0 0) will
  44. // create a solid color texture
  45.  
  46. void    Texture_Init (bool bHardInit = true);
  47. void    Texture_FlushUnused ();
  48. void    Texture_Flush (bool bReload = false);
  49. void    Texture_ClearInuse (void);
  50. void    Texture_ShowInuse (void);
  51. void    Texture_ShowDirectory (int menunum, bool bLinked = false);
  52. void    Texture_ShowAll();
  53. void Texture_Cleanup(CStringList *pList = NULL);
  54.  
  55. // TTimo: added bNoAlpha flag to ignore alpha channel when parsing a .TGA file, transparency is usually achieved through qer_trans keyword in shaders
  56. // in some cases loading an empty alpha channel causes display bugs (brushes not seen)
  57. qtexture_t *Texture_ForName (const char *name, bool bReplace = false, bool bShader = false, bool bNoAlpha = false, bool bReload = false, bool makeShader = true);
  58.  
  59. void    Texture_Init (void);
  60. // Timo
  61. // added an optional IPluginTexdef when one is available
  62. // we need a forward declaration, this is crap
  63. class IPluginTexdef;
  64. void    Texture_SetTexture (texdef_t *texdef, brushprimit_texdef_t *brushprimit_texdef, bool bFitScale = false, IPluginTexdef *pTexdef = NULL, bool bSetSelection = true);
  65.  
  66. void    Texture_SetMode(int iMenu);    // GL_TEXTURE_NEAREST, etc..
  67. void Texture_ResetPosition();
  68.  
  69. void FreeShaders();
  70. void LoadShaders();
  71. void ReloadShaders();
  72. int  WINAPI Texture_LoadSkin(char *pName, int *pnWidth, int *pnHeight);
  73. void Texture_LoadFromPlugIn(LPVOID vp);
  74. void Texture_StartPos (void);
  75. qtexture_t *Texture_NextPos (int *x, int *y);
  76.